// @algorithm @lc id=1708 lang=cpp 
// @title design-parking-system

#define FULL 0x3FF
#define GET(t) ( FULL & (_capacity >> ((t)-1)*10) )
#define DEC(t) ( _capacity -= (1<<((t)-1)*10) )
class ParkingSystem {
	uint32_t _capacity = 0;
public:
    ParkingSystem(int big, int medium, int small) {
		_capacity |= big;
		_capacity |= medium << 10;
		_capacity |= small << 20;
    }
    
    bool addCar(int carType) {
		if(GET(carType) == 0)
			return false;
		DEC(carType);
		return true;
    }
};

/**
 * Your ParkingSystem object will be instantiated and called as such:
 * ParkingSystem* obj = new ParkingSystem(big, medium, small);
 * bool param_1 = obj->addCar(carType);
 */